package com.plian.system.dao.pm.propertyInfo;

import com.plian.system.entity.pm.propertyinformation.PropertyInformation;
import com.plian.system.entity.pm.propertyinformation.PropertyTime;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author huzb
 * @create 2020-10-13 10:44
 */
@Component
public class PropertyInforDao {

    @Resource(name = "sqlSessionTemplate")
    private SqlSessionTemplate sqlSessionTemplate;
    /**
     * 第一次查询无参数，全部查询
     * @return
     */
    public List<PropertyInformation> selectAll(){
        return sqlSessionTemplate.selectList("com.plian.system.mapper.pm.propertyInfo.propertyInfoMapper");
    }

    /**
     * 第二次查询,查询时间段内的数据
     * @return
     */
    public List<PropertyInformation> selectByTime(PropertyTime time){
        return sqlSessionTemplate.selectList("com.plian.system.mapper.pm.propertyInfo.propertyInfoMapper");
    }
}
